﻿@model PromotionControllerModel.DiscountList
<div class="pageHeader">
    <form>
    <div class="searchBar">
        <ul class="searchContent">
            <li>
                <label>
                    名称</label>
                <input type="text" name="name" />
            </li>
        </ul>
        <div class="subBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">
                                查找</button></div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="" target="navTab"><span>添加</span></a></li>
            <li><a class="add" href="" target="navTab"><span>添加</span></a></li>
            <li><a class="icon" rel="/Promotion/Requirement" target="dialog" href="/Promotion/Requirement/{param}"
                mask="true" width="800" height="600" onclick="javascript:void(0);"><span>折扣条件</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layouth="138">
        <thead>
            <tr>
                <th width="240">
                    名 称
                </th>
                <th width="120">
                    被指派给
                </th>
                <th width="120">
                    折扣
                </th>
                <th width="120">
                    开始时间
                </th>
                <th width="120">
                    结束时间
                </th>
                  <th width="120">
                    使用限制
                </th>
                <th>
                    操 作
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var o in Model.Discounts)
            {
                <tr target="param" rel="@(o.Id)">
                    <td>@o.Name
                    </td>
                    <td>@(o.AssignedToText)
                    </td>
                    <td>@(o.UsePercentage ? "使用百分比（" + o.Percentage + "%）" : "折扣金额（" + o.Amount.ToString("0") + "元）")
                    </td>
                    <td>
                        @o.StartDate.ToString(string.Empty)
                    </td>
                    <td>
                        @o.EndDate.ToString(string.Empty)
                    </td>
                    <td>@o.GetLimitation()
                    </td>
                       <td>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
